home *** CD-ROM | disk | FTP | other *** search
/ Aminet 22 / Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso / Aminet / util / blank / BeyondTheDark.lha / BeyondTheDark / Developer / Source / CGraphX / CGraphX.c next >
C/C++ Source or Header  |  1997-04-20  |  1KB  |  62 lines

  1.  
  2. #include <graphics/gfxbase.h>
  3. #include <intuition/intuition.h>
  4. #include <utility/tagitem.h>
  5. #include <cybergraphics/cybergraphics.h>
  6.  
  7. #define __USE_SYSBASE 42
  8.  
  9. #include <proto/cybergraphics.h>
  10. #include <proto/exec.h>
  11. #include <proto/graphics.h>
  12.  
  13. #include "BTD.h"
  14.  
  15. struct GfxBase *GfxBase;
  16. struct Library *CyberGfxBase;
  17.  
  18. struct DPMSInfo CyberGraphXInfo =
  19.  {
  20.   DPMS_Revision,
  21.   "CyberGraphX","DPMS for the CyberGraphX system","Matthias Scheler",
  22.  };
  23.  
  24. /* library stuff */
  25.  
  26. char MyDPMSName[] = "cgraphx.dpms";
  27. char MyDPMSID[]   = "CGraphX DPMS V" VERSION "." REVISION " for BTD";
  28.  
  29. LONG MyDPMSLibInit(void)
  30.  
  31. {
  32.  if (GfxBase=(struct GfxBase *)OpenLibrary("graphics.library",37L))
  33.   {
  34.    if (CyberGfxBase=OpenLibrary("cybergraphics.library",40L)) return TRUE;
  35.  
  36.    CloseLibrary (&GfxBase->LibNode);
  37.   }
  38.  return FALSE;
  39. }
  40.  
  41. void MyDPMSLibFree(void)
  42.  
  43. {
  44.  CloseLibrary (CyberGfxBase);
  45.  CloseLibrary (&GfxBase->LibNode);
  46. }
  47.  
  48. /* implementation of library functions */
  49.  
  50. struct DPMSInfo *QueryMyDPMS(void)
  51.  
  52. {
  53.  return &CyberGraphXInfo;
  54. }
  55.  
  56. void SetMyDPMSLevel(struct Screen *Screen,ULONG Level)
  57.  
  58. {
  59.  if (IsCyberModeID(GetVPModeID(&Screen->ViewPort)))
  60.   CVideoCtrlTags (&Screen->ViewPort,SETVC_DPMSLevel,Level,TAG_DONE);
  61. }
  62.